package test.san.baseproject.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter
import test.san.baseproject.model.AreaBeam
import test.san.baseproject.ui.fragment.MvPageFragment

class MvPageAdapter(val list: List<AreaBeam>?,fm: FragmentManager) : FragmentPagerAdapter(fm) {

    override fun getItem(position: Int): Fragment {
        return MvPageFragment()
    }

    override fun getCount(): Int {
        return list?.size ?: 0
    }

    override fun getPageTitle(position: Int): CharSequence? {
        return list?.get(position)?.title
    }
}